package restaurant.service.impl;

import java.sql.SQLException;
import java.util.List;

import restaurant.dao.CuisineDao;
import restaurant.dao.impl.CuisineDaoImpl;
import restaurant.pojo.FoodsType;
import restaurant.service.CuisineService;

public class CuisineServiceImpl implements CuisineService{
	private CuisineDao dao = new CuisineDaoImpl();
	@Override
	public int addCuisine(String type) throws SQLException {
		
		return dao.addCuisine(type);
	}
	@Override
	public List<FoodsType> showCuisine() throws SQLException {
		
		return dao.showCuisine();
	}
	@Override
	public int updateCuisine(String type, String id) throws SQLException {
		
		return dao.updateCuisine(id, type);
	}
	@Override
	public int deleteCuisine(String id) throws SQLException {
		
		return dao.deleteCuisine(id);
	}
	@Override
	public List<FoodsType> findCuisine(String param) throws SQLException {
		param = "%" + param + "%";
		return dao.find(param);
	}

}
